import request from '@/utils/request'
import qs from 'qs'
export const addPrice = (price, name, duration) => {
  const data = {
    price,
    name,
    duration
  }
  return request({
    url: '/admin/price/add',
    method: 'post',
    data: qs.stringify(data)
  })
}
export const upDate = (price, name, duration, id) => {
  const data = {
    price,
    name,
    duration,
    id
  }
  return request({
    url: '/admin/price/update',
    method: 'post',
    data: qs.stringify(data)
  })
}
export const deletePrice = (id) => {
  const data = {
    id
  }
  return request({
    url: '/admin/price/delete',
    method: 'post',
    data: qs.stringify(data)
  })
}
export const findPrice = () => {
  return request({
    url: '/admin/price/find',
    method: 'post'
  })
}
